#!/usr/bin/python3
# -*- coding:utf-8 -*-
""""
@Author: 李吉凯
@Email: lijk34925@hundsun.com
@Time: 2021/11/9 18:19
@File: run.py
"""

import uvicorn
import os
# from fastapi import FastAPI  # 导入FastAPI


def main():
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangoProject.settings")
    os.environ["DJANGO_ALLOW_ASYNC_UNSAFE"] = "true"           # 允许异步认证 20211116
    uvicorn.run(
        "djangoProject.asgi:application",
        host="0.0.0.0",
        port=8001,
        log_level="debug",
        reload=True,
    )


if __name__ == "__main__":
    main()
